<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 400px;
            height: 400px;
            border: 1px solid #000;
            box-sizing: border-box;
            display: grid;
            grid-template-columns: 100px 100px 100px 100px;
            grid-template-rows: 100px 100px 100px 100px;
        }

        .box>div:nth-child(2n+1) {
            background-color: pink;
        }

        .box>div:nth-child(2n) {
            background-color: skyblue;
        }
    </style>
</head>

<body>
    <div class="box">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
<script>
   function deepCopy(obj) {
  if (typeof obj === 'object') {
    var result = obj.constructor === Array ? [] : {};
    
    for (var i in obj) {
      result[i] = typeof obj[i] === 'object' ? deepCopy(obj[i]) : obj[i];
    }
  } else {
    var result = obj;
  }
  
  return result;
}
function shallowClone(obj) {
  let cloneObj = {};
  
  for (let i in obj) {
    cloneObj[i] = obj[i];
  }
  
  return cloneObj;
}

var obj={
    name:'张三',
    gender:'男',
    age:12,
    likes:{
        one:'eat',
        two:'sleep'
    }
}
// for(var attr in obj){
//   console.log(attr);
//   console.log(obj[attr]);
// }
var aa='name'
console.log(obj.name);
// var res={...obj}
// var res1=obj
// console.log(res==obj);
// console.log(res1==obj);

// function fn(a){
//   function a(){
//     console.log(1);
//   }
//   console.log(a);
// }
// fn(19)
(function(){
  console.log(1111);
})()
</script>

</html>